package com.marmot.cloud.framework.biz.po;

import com.marmot.cloud.framework.orm.jpa.comment.annotation.Comment;
import com.marmot.cloud.framework.orm.jpa.entity.BaseJpaEntity;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Index;
import jakarta.persistence.Table;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;


@Data
@EqualsAndHashCode(callSuper=false)
@Accessors(chain = true)
@Entity
@Table(name = "t_menu",indexes = {
        @Index(name = "index_sys_menu_id",columnList = "id"),
        @Index(name = "index_sys_menu_parent_id",columnList = "parentId"),
        @Index(name = "index_sys_menu_level",columnList = "level")
})
@Comment("菜单信息表")
public class Menu extends BaseJpaEntity {

    @Column(length = 50)
    @Comment("菜单名称")
    private String menuName;

    @Column
    @Comment("父菜单ID")
    private String parentId;

    @Column
    @Comment("显示顺序")
    private Integer orderNum;

    @Column(length = 200)
    @Comment("请求地址")
    private String url;

    @Column
    @Comment("菜单类型:1=目录,2=菜单,3=按钮")
    private Integer menuType;

    @Column(length = 100)
    @Comment("权限标识")
    private String perms;

    @Column
    @Comment("菜单层级")
    private Integer level;

    @Column(length = 100)
    @Comment("菜单图标")
    private String icon;


    @Column
    @Comment("是否外链")
    private Integer isFrame;

    @Column
    @Comment("菜单状态:1=显示,2=隐藏")
    private Integer visible;

    @Column(length = 500)
    @Comment("备注")
    private String remark;


}
